
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class ButtonButtonCfg : public ManualSingleton <ButtonButtonCfg>
{
	friend ManualSingleton <ButtonButtonCfg>;
public:
	ButtonButtonCfg();
	~ButtonButtonCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const ButtonButtonCfgInfo *GetButtonButtonCfgInfo(int32_t id);
	const ButtonButtonCfgMap *GetButtonButtonCfgMap() { return &m_ButtonButtonCfgMap; }
private:
	ButtonButtonCfgMap m_ButtonButtonCfgMap;
};

#define  g_MakeButtonButtonCfgTable() (ButtonButtonCfg::Instance())
#define  g_GetButtonButtonCfgTable() (ButtonButtonCfg::GetInstance())
#define  g_DelButtonButtonCfgTable() (ButtonButtonCfg::Destroy())